﻿using System;
using System.Web.UI;
using METU_CMT.Business;

namespace METU_CMT
{
    public partial class InstructorCourseMainScreen : Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if(!IsPostBack)
            {
                BindCourseInfo(  );
            }
        }

        private void BindCourseInfo()
        {
            dtgInstructors.DataSource = EntityFactory.GetInstructorsOfCourse( );
            dtgInstructors.DataBind();

            dtgTAs.DataSource = EntityFactory.GetTeachingAssistantsOfCourse( EntityFactory.CourseId );
            dtgTAs.DataBind();
        }

        protected void OnLnkBtnAnnouncementsClicked(object sender, EventArgs e)
        {
            Response.Redirect("~/InstructorAnnouncementsMainScreen.aspx");
        }

        protected void OnLnkBtnScheduleClicked(object sender, EventArgs e)
        {
            Response.Redirect("~/InstructorScheduleMainScreen.aspx");
        }

        protected void OnLnkBtnLectureNotesLClicked(object sender, EventArgs e)
        {
            Response.Redirect("~/InstructorLectureNotesMainScreen.aspx");
        }

        protected void OnLnkBtnStudentsClicked(object sender, EventArgs e)
        {
            Response.Redirect("~/EditStudentsScreen.aspx");
        }

        protected void OnLnkBtnTeamsClicked(object sender, EventArgs e)
        {
            Response.Redirect("~/EditProjectTeamScreen.aspx");
        }

        protected void OnLnkBtnReviewTeamsClicked(object sender, EventArgs e)
        {
            Response.Redirect("~/AssignReviewTeamScreen.aspx");
        }

        protected void OnLnkBtnTAsClicked(object sender, EventArgs e)
        {
            Response.Redirect("~/EditTeachingAssistantsScreen.aspx");
        }

        protected void OnLnkBtnUpdateCourseClicked( object sender, EventArgs e )
        {
            Response.Redirect("~/UpdateCourseScreen.aspx");
        }
    }
}